package com.atom.process.cnmuseum.bm.dao.process;

import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Repository;

import com.atom.common.dao.AvensCommonDao;
import com.atom.common.mb.entity.gl.MultimediaDO;
import com.atom.common.remote.user.UserUtil;
import com.atom.process.cnmuseum.bm.entity.process.BmMultimediaProcessDO;


@Repository
public class BmMultimediaProcessDao extends AvensCommonDao<BmMultimediaProcessDO>{

	public void createPDO(UserUtil user, String processInstanceId, String biaoTi, MultimediaDO multimedia) {
		// TODO Auto-generated method stub
        BmMultimediaProcessDO pdo = new BmMultimediaProcessDO();
        BeanUtils.copyProperties(multimedia, pdo, "id");
        pdo.setProcessId(processInstanceId);
        super.save(pdo);
	}

	public List<BmMultimediaProcessDO> findByProcessInstanceId(String processId) {
		// TODO Auto-generated method stub
        List<BmMultimediaProcessDO> list = super.findByProperty("processId", processId);
        return list;
	}

}
